
import os

"""
路径封装
"""

BASE_DIR = os.path.dirname(os.path.dirname(__file__))


def yaml_file(yaml_name):
    yaml_dir = os.path.join(BASE_DIR, "datas")
    yaml_file = os.path.join(yaml_dir, yaml_name)

    return yaml_file

# 封装日志路径
LOGER_DIR = os.path.join(BASE_DIR, "logs")              #os.path.dirname和os.path.join,前者是读取文件的目录，后置是拼接，比如拼接路径
INFO_FILE = os.path.join(LOGER_DIR, "info_logs")
ERROR_FILE = os.path.join(LOGER_DIR, "error_logs")

# 封装allure路径
REPORT_DIR = os.path.join(BASE_DIR, "report")
REPORT_JSON = os.path.join(REPORT_DIR, "allure_json")
REPORT_HTML = os.path.join(REPORT_DIR, "allure_html")
print(REPORT_JSON)
print(REPORT_HTML)

# 封装case存放路径
CASES_FILE = os.path.join(BASE_DIR, "testcase")
print(CASES_FILE)